#include "widget.h"
#include "ui_widget.h"
#include <QDebug>
Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);
}

Widget::~Widget()
{
    delete ui;

}


void Widget::on_pushButton_clicked()
{
    float opacity = windowOpacity();
    if(opacity >= 1.0)
    {
        return;
    }
    qDebug()<<opacity;

    setWindowOpacity(opacity + 0.2);
}

void Widget::on_pushButton_2_clicked()
{
    float opacity = windowOpacity();
    if(opacity <= 0.0)
    {
        return;
    }
    qDebug()<<opacity;

    setWindowOpacity(opacity - 0.2);
}
